package org.dftproject.genesis.ui;

import org.dftproject.genesis.ui.views.RelatedItemsView;
import org.dftproject.genesis.ui.views.TaskListView;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class Perspective implements IPerspectiveFactory {

	public static final String ID = Perspective.class.getName();

	public void createInitialLayout(IPageLayout layout) {
		IFolderLayout sidebar = layout.createFolder("sidebar", IPageLayout.LEFT, 0.3f, layout.getEditorArea());
		sidebar.addView(TaskListView.ID);
		
		IFolderLayout relatedItems = layout.createFolder("relatedItems", IPageLayout.BOTTOM, 0.5f, "sidebar");
		relatedItems.addView(RelatedItemsView.ID);
		
		layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, 0.7f, layout.getEditorArea());
	}
	
}
